﻿using System;
using GrapeCity.Forguncy.Plugin;
using TencentCloudOcrPlugin.Ocr;

namespace TencentCloudOcrPlugin
{
    public static class TencentCloudApiOperationFactory
    {
        public static ObjectPropertyBase GetSetting(TencentCloudApiOperationType operationType)
        {
            return operationType switch
            {
                TencentCloudApiOperationType.OcrBusinessCard => new OcrBusinessCardProperties(),
                TencentCloudApiOperationType.OcrIdCard => new OcrIdCardProperties(),
                TencentCloudApiOperationType.OcrBankCard => new OcrBankCardProperties(),
                TencentCloudApiOperationType.OcrVehicleLicense => new OcrVehicleLicenseProperties(),
                TencentCloudApiOperationType.OcrDriverLicense => new OcrDriverLicenseProperties(),
                TencentCloudApiOperationType.OcrBizLicense => new OcrBizLicenseProperties(),
                TencentCloudApiOperationType.OcrPassport => new OcrPassportProperties(),
                TencentCloudApiOperationType.OcrVatInvoice => new OcrVatInvoiceProperties(),
                _ => throw new NotImplementedException()
            };
        }
    }
}